﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Windows.Forms;

namespace EOffice.Business
{
    static class Process
    {
        public static void buzz(Form form, System.Media.SoundPlayer sp)
        {
            int x = form.Location.X;
            int y = form.Location.Y;
            try
            {
                sp.Play();
            }
            catch { }
            for (int i = 0; i < 5; i++)
            {
                form.Location = new System.Drawing.Point(x + 5, y + 5);
                System.Threading.Thread.Sleep(10);
                form.Location = new System.Drawing.Point(x + 5, y - 5);
                System.Threading.Thread.Sleep(10);
                form.Location = new System.Drawing.Point(x - 5, y - 5);
                System.Threading.Thread.Sleep(10);
                form.Location = new System.Drawing.Point(x - 5, y + 5);
                System.Threading.Thread.Sleep(10);
            }
            form.Location = new System.Drawing.Point(x, y);
        }
    }
}
